#include "m.h"


void destroy_node(p_list head)
{
    p_list p = NULL;
    p_list q = NULL;
    
    list_for_each_entry_safe(p,q,&(head->list),list)
    {
        list_del(&(p->list));
        free(p);
    }
    
    free(head);
    
    return;
}